package com.itheima.sh.controller;

import com.itheima.clients.UserFeignApi;
import com.itheima.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("feign")
public class FeignController {

    @Autowired
   UserFeignApi userFeignApi;
    @GetMapping("{id}")
    public User queryById(@PathVariable("id") String username){
        User user = userFeignApi.queryById(username);
        return user;
    }

}
